Skip to content

Prevent pytest fail with non unicode chars#1384

Merged
aseembits93 merged 6 commits intomainfrom
non-unicode-pytest-fail
Feb 25, 2026
Merged

Prevent pytest fail with non unicode chars#1384
aseembits93 merged 6 commits intomainfrom
non-unicode-pytest-fail

Conversation

@aseembits93
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread codeflash/verification/parse_test_output.py
Comment thread codeflash/github/PrComment.py Outdated
@KRRT7
Copy link
Copy Markdown
Collaborator

KRRT7 commented Feb 11, 2026

@claude rebase on top of main to fix the merge conflicts

@codeflash-ai codeflash-ai deleted a comment from claude Bot Feb 25, 2026
@codeflash-ai codeflash-ai deleted a comment from claude Bot Feb 25, 2026
@codeflash-ai codeflash-ai deleted a comment from claude Bot Feb 25, 2026
@codeflash-ai codeflash-ai deleted a comment from codeflash-ai Bot Feb 25, 2026
@aseembits93 aseembits93 merged commit bbad363 into main Feb 25, 2026
26 of 30 checks passed
@aseembits93 aseembits93 deleted the non-unicode-pytest-fail branch February 25, 2026 17:17
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 25, 2026

PR Review Summary

Prek Checks

✅ All checks pass — ruff check and ruff format both passed with no issues.

Mypy

✅ No new type errors introduced. 4 pre-existing errors in shell_utils.py (unreachable statements, return type mismatch) are unrelated to this PR's changes.

Code Review

No critical issues found. This is a clean, minimal change.

The PR adds errors='replace' to subprocess.run() kwargs when text=True in get_cross_platform_subprocess_run_args(). This prevents UnicodeDecodeError when subprocess output (e.g., pytest) contains non-UTF-8 bytes, replacing them with U+FFFD instead of crashing.

Previous review comments: Updated 2 stale comments that referenced files (parse_test_output.py, PrComment.py) no longer changed in this PR.

Test Coverage

File Stmts (PR) Miss (PR) Cover (PR) Cover (main) Delta
codeflash/code_utils/shell_utils.py 157 61 61% 51% +10%
  • New lines 264-265 are covered by existing tests
  • ℹ️ Missing lines 267-270 are the Windows-specific branch (sys.platform == "win32") — expected on Linux CI
  • Overall project coverage: 78% (no regression)
  • ✅ No new files added

Last updated: 2026-02-25T17:10Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants